FTP / FTPS (FlashAir original extension)

Last update: May 2018

FTP

Command ID Function Name Description
0E001h get(hostname, port, user, pass, serverFile, localFile) Retrieve files from FTP server
0E002h put(hostName, port, user, pass, serverFile, localFile) Send the file to the FTP server
0E003h rename(hostName, port, user, pass, sourceFile, distinationFile) Change file name on FTP server
0E004h delete(hostName, port, user, pass, serverFile) Delete FTP server file
0E005h getList(hostName, port, user, pass, directoryName) Retrieve directory information of FTP server

FTPS

Command ID Function Name Description
0E011h get(hostname, port, mode, user, pass, serverFile, localFile) Retrieve files from FTPS server
0E012h put(hostName, port, mode, user, pass, serverFile, localFile) Send the file to the FTPS server
0E013h rename(hostName, port, mode, user, pass, sourceFile, distinationFile) Change file name on FTPS server
0E014h delete(hostName, port, mode, user, pass, serverFile) Delete FTPS server file
0E015h getList(hostName, port, mode, user, pass, directoryName) Retrieve directory information of FTPS server

get(hostname, port, user, pass, serverFile, localFile)

Fetch the file from the FTP server. The acquired file is saved with the file path name of the specified localFile.

Command ID

0E001h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTP server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTP server. A maximum of 128 characters can be specified.
localFile Value Variable length Name given to the acquired file. A maximum of 128 characters can be specified.

Response

None.

put(hostName, port, user, pass, serverFile, localFile)

Send the file to the FTP server.

Command ID

0E002h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTP server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTP server. A maximum of 128 characters can be specified.
localFile Value Variable length The file name to send. A maximum of 128 characters can be specified.

Response

None.

rename(hostName, port, user, pass, sourceFile, distinationFile)

Change the file name on the FTP server.

Command ID

0E003h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTP server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTP server. A maximum of 128 characters can be specified.
distinationFile Value Variable length The file name after change. A maximum of 128 characters can be specified.

Response

None.

delete(hostName, port, user, pass, serverFile)

Delete the file on the FTP server.

Command ID

0E004h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTP server. A maximum of 64 characters can be specified.
serverFile Value Variable length The file name to delete on the FTP server. A maximum of 128 characters can be specified.

Response

None.

getList(hostName, port, user, pass, directoryName)

Get the directory information of the FTP server. The data to be acquired is a character string created by the FTP server.

Command ID

0E005h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTP server. A maximum of 64 characters can be specified.
directoryName Value Variable length Directory name to get information on FTP server. A maximum of 128 characters can be specified.

Response

You can get a list under the directory specified by directoryName.

get(hostname, port, mode, user, pass, serverFile, localFile)

Fetch the file from the FTPS server. The acquired file is saved with the file path name of the specified localFile.

Command ID

0E011h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
mode integer 1 byte Mode setting.
user Value Variable length The user name of the FTPS server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTPS server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTPS server. A maximum of 128 characters can be specified.
localFile Value Variable length Name given to the acquired file. A maximum of 128 characters can be specified.

Response

None.

put(hostName, port, mode, user, pass, serverFile, localFile)

Send the file to the FTPS server.

Command ID

0E012h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
mode integer 1 byte Mode setting.
user Value Variable length The user name of the FTPS server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTPS server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTPS server. A maximum of 128 characters can be specified.
localFile Value Variable length The file name to send. A maximum of 128 characters can be specified.

Response

None.

rename(hostName, port, mode, user, pass, sourceFile, distinationFile)

Change the file name on the FTPS server.

Command ID

0E013h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
mode integer 1 byte Mode setting.
user Value Variable length The user name of the FTP server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTPS server. A maximum of 64 characters can be specified.
serverFile Value Variable length File name on the FTPS server. A maximum of 128 characters can be specified.
distinationFile Value Variable length The file name after change. A maximum of 128 characters can be specified.

Response

None.

delete(hostName, port, mode, user, pass, serverFile)

Delete the FTPS server file.

Command ID

0E014h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
mode integer 1 byte Mode setting.
user Value Variable length The user name of the FTPS server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTPS server. A maximum of 64 characters can be specified.
serverFile Value Variable length The file name to delete on the FTPS server. A maximum of 128 characters can be specified.

Response

None.

getList(hostName, port, mode, user, pass, directoryName)

Get the directory information of the FTPS server. The data to be acquired is a character string created by the FTPS server.

Command ID

0E015h

Arguments

Name Type Size Description
hostname Value Variable length Hostname. A maximum of 128 characters can be specified.
port integer 2 bytes Port number.
mode integer 1 byte Mode setting.
user Value Variable length The user name of the FTPS server. A maximum of 64 characters can be specified.
pass Value Variable length The password of the FTPS server. A maximum of 64 characters can be specified.
directoryName Value Variable length Directory name from which to obtain information on FTPS server. A maximum of 128 characters can be specified.

Response

You can get a list under the directory specified by directoryName.